<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>添加广告窗</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/add_ad.css">
	<script type="text/javascript">
		function success(){
			alert("添加成功");
		}
		
		function jiaoyan(){
			var bol=true;
			if(document.getElementById("imgid1").value==""){
				bol=false;
				alert("图片1不能为空");
			}else if(document.getElementById("imgid2").value==""){
				bol=false;
				alert("图片2不能为空");	
			}else if(document.getElementById("imgid3").value==""){
				bol=false;
				alert("图片3不能为空");	
			}else if(document.getElementById("imgid4").value==""){
				bol=false;
				alert("图片4不能为空");	
			}else if(document.getElementById("imgid5").value==""){
				bol=false;
				alert("图5不能为空");	
			}else if(document.getElementById("imgid6").value==""){
				bol=false;
				alert("图片6不能为空");	
			}
			
			return bol;
		}
	
	
	</script>

  </head>
  
  <body>
    <div class="div_all">
     
     	<div class="div_1">
     			<div style="position: absolute;">
			<%-- <c:if test="${username1!=null}">
				<span style="color:red;">用户名: ${username1}</span>
			</c:if>
			
			<!--若未输入用户名，跳转到登录界面 -->
			<c:if test="${username1==null}">
				<a href="dengru.jsp" style="text-decoration: none;color:red;">亲，请登入</a>
			</c:if></div> --%>
			<!-- <div class="div_menu">
				<a href="add_goods_showtype.do" class="a_menu">添加商品 </a>
  				<a href="show_goods.do" class="a_menu">查询商品 </a>
  				<a href="add_type.do" class="a_menu">类别管理 </a>
  				<a href="show_ads.do" class="a_menu">广告维护 </a>
  				<a href="zhuce.jsp" class="a_menu">注册账号 </a>
  				<a href="qiehuanUser.do" class="a_menu">切换账号 </a>
  				<a href="select_orders.do" class="a_menu">订单查询 </a>
  				<a href="go_tongji.do" class="a_menu">销售统计 </a>
			</div> -->
     	</div>
     	
     	<div class="div_2">
     		<div class="div_add">
     			<form action="add_ad.do" method="post" enctype="multipart/form-data" onsubmit="return jiaoyan()">
     				<span class="add_zi">广告窗添加</span><br/>
	     			<span class="add_zi1">图片1:</span><input class="img_id" id="imgid1" type="file" name="ad_img1"/><br/>
	     			<span class="add_zi1">图片2:</span><input class="img_id" id="imgid2" type="file" name="ad_img2"/><br/>
	     			<span class="add_zi1">图片3:</span><input class="img_id" id="imgid3" type="file" name="ad_img3"/><br/>
	     			<span class="add_zi1">图片4:</span><input class="img_id" id="imgid4" type="file" name="ad_img4"/><br/>
	     			<span class="add_zi1">图片5:</span><input class="img_id" id="imgid5" type="file" name="ad_img5"/><br/>
	     			<span class="add_zi1">图片6:</span><input class="img_id" id="imgid6" type="file" name="ad_img6"/><br/>
	     			<input class="img_id1" type="submit" value="提交" onclick="success()"/>
     			</form>
     		</div>
     	</div>
     </div>
  </body>
</html>
